package com.pronosticnews.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.pronosticnews.shared.model.ClubDto;

public class SelectedClubEvent extends GwtEvent<SelectedClubEventHandler> {
	public static Type<SelectedClubEventHandler> TYPE = new Type<SelectedClubEventHandler>();
	
	private ClubDto championnatSelected;

	public SelectedClubEvent(ClubDto championnatSelected) {
		this.championnatSelected = championnatSelected;
	}

	@Override
	public Type<SelectedClubEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(SelectedClubEventHandler handler) {
		handler.onSelect(this);
	}

	public ClubDto getClubSelected() {
		return championnatSelected;
	}
	
}
